<?php #//v.3.3.0
#///////////////////////////////////////////////////////
#//  COPYRIGHT 2004 Phpauction.org ALL RIGHTS RESERVED//
#///////////////////////////////////////////////////////

require('./includes/config.inc.php');


$TIME = mktime(date("H")+$SETTINGS['timecorrection'],date("i"),date("s"),date("m"), date("d"),date("Y"));

$NOW = date("YmdHis",$TIME);

?>





    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>


<style type="text/css">
<!--

BODY {
  font-family: verdana, tahoma, sans-serif;
   border-style:solid;
border-width:0px;
         }

                   A:link {text-decoration: none ; color:#000080;}
A:visited {text-decoration: none; color:#000080;}
A:active {text-decoration: underline; color: #008000;}
A:hover {text-decoration: underline; color: #008000;}
    
    
.PAGEWRAPPER {
width: 770px;
border: 0px solid black; 
} 
  


.ACTIVEBOX {
background-image: url('images/BOX_180x260.jpg');
background-repeat:no-repeat;
text-align: center;
  width:181px;
  height: 261px;
  position: relative; 
   float: left;
   border-style:solid;
border-width:0px;
margin:5px;
}

.TITLE {
         border-style:solid;
border-width:0px;
     height: 30px;
                      position: relative; 
  font-size: 11px; 
     font-weight: bold; 
     top: 5px;
     }
 
     
   .RETAILPRICE {
    border-style:solid;
       font-size: 10px; 
border-width:0px;
  height: 20px;
     top: 4px;
                position: relative; 
           color: #aaaaaa;
}

.ITEMPIC {
     border-style:solid;
border-width:0px;
   height: 80px;.

               position: relative; 
   }

.COUNTDOWN {
     border-style:solid;
border-width:0px;
   height: 60px;
    font-size: 22px; 
   font-weight: bold; 
      color: #003300;
              position: relative; 
   }
   .HIGHBID {
     border-style:solid;
border-width:0px;
font-weight: bold; 
   height: 25px;
   width:50%;
   float: left; 
            
   Left: 25%;
    font-size: 18px;
              position: relative; 
              

   }
   
    .HIGHBIDDER {
     border-style:solid;
border-width:0px;
   height:20px;
    font-size: 10px;       top: 4px;
                         clear: left;  
              position: relative; 
               color: #444444;
   }

 .BIDBUTTON {
     border-style:solid;
border-width:0px;
font-weight: bold; 
   height: 25px;
    font-size: 16px;
             top: 11px;
               position: relative; 
   }


.NAVHEAD {
  width:770px;
  height: 116px;
 border-style:solid;
border-width:0px;
margin:0px;
}

.LOGO {
  width:173px;
  height: 98px;
  position: relative; 
   float: left;
   border-style:solid;
border-width:0px;
margin:0px;
padding:9px;
text-align: left;


}

.SELECTCITY {
/* background-image: url('images/city_background.jpg'); */
  width:256px;
  height: 50px;
  position: relative; 
  left:16px;
   float: left;
   border-style:solid;
   zindex=-1;
border-width:0px;
margin:0px;
}


.LOGIN{
    font-family: Verdana, Tahoma, Arial, Sans-Serif;
    font-size: 8px;
    color: #bbbbbb;
  width:220px;
  height: 25px;
  position: relative; 
  top:5px;
    left:25px;
   float: left;
   border-style:solid;
border-width:0px;
margin:0px;
}

.LOGINBUTTON{
    font-family: Verdana, Tahoma, Arial, Sans-Serif;
    font-size: 8px;
    color: #bbbbbb;
  width:75px;
  height: 25px;
  position: relative; 
    top:5px;
    left:25px;
   float: left;
   border-style:solid;
border-width:0px;
margin:0px;
}

.FORGOTPASSWORD{
    font-family: Verdana, Tahoma, Arial, Sans-Serif;
    font-size: 9px;
      font-weight: bolder;
    color: #cccccc;
  width:100px;
  height: 25px;
  position: relative; 
   float: left;
   left:137px;
   border-style:solid;
border-width:0px;
margin:0px;
  
}

.NAVBAR{
background-image: url('images/navbar2.jpg');
          background-repeat:no-repeat;
font-family: tahoma, verdana, sans-serif;
	text-decoration: none;

 font-size: 13px;
      font-weight: bold;
      color: #000;
  width:577px;
  height: 37px;
  position: relative; 
   float: left;
   border-style:solid;
border-width:0px;
text-align: center;

}


#NAVBARLINKS {
top:80;
position:relative;
    top:3px;
color:#fff;
	font-size: 15px;
  	font-weight:bold;
    	font-family:       tahoma, verdana, sans-serif;	

} 

    
#NAVBARLINKS_SIGNUP{
top:80;
position:relative;
    top:4px;
color:#C5FF00;
	font-size: 20px;
  	font-weight:bold;
    	font-family:       tahoma, verdana, sans-serif;	
}
      


.NAVBARTEXT{
  width:575px;
  height: 20px;
  position: relative; 
   float: left;
   border-style:solid;
border-width:0px;
top: 10px;
margin:0px;

    font-family: Verdana, Tahoma, Arial, Sans-Serif;
    font-size: 11px;
      font-weight: bold;
}

input[type="text"], #inputArea textarea
{
    font-family: Verdana, Tahoma, Arial, Sans-Serif;
    font-size: 9px;
    margin-bottom: 0px;
    padding: 1px;
    border: solid 1px #bbbbbb;
    width: 95px;
    color: #bbbbbb;
    font-weight: bolder;
}


.HOLDINGBOX {
background-image: url('images/holding_background.jpg');
  width:751px;
  height: 106px;
  position: relative; 
   float: left;
   border-style:solid;
border-width:0px;
margin:5px;
}

.HOLDINGITEMPIC {
  width:200px;
  height: 100px;
     border-style:solid;
border-width:0px;
      position: relative; 
        float: left;
   }

.HOLDINGTITLE {

  width:250px;
  height: 100px;
         border-style:solid;
border-width:0px;
                      position: relative; 
  font-size: 12px; 
     font-weight: bold; 
     top: 5px;
       float: left;
     }
 
     
   .HOLDINGRETAILPRICE {
    border-style:solid;
       font-size: 10px; 
border-width:0px;
  width:100px;
  height: 100px;
                position: relative; 
           color: #aaaaaa;
             float: left;
}

.HOLDINGCOUNTDOWN {
     border-style:solid;
border-width:0px;
    font-size: 22px; 
   font-weight: bold; 
      color: #003300;
              position: relative; 
      width:210px;
  height: 100px;   
    float: left;       
   }





-->
</style>


<title>Bid on Penny Auctions.  QashQliq.com</title>
<meta name="description"
	content="QashQliq offers brand new products at incredible discounts through entertaining and exciting Penny Auctions" />
<meta name="keywords"
	content="gift card,gift,bid,shopping,discount,electronics,nintendo,nintendo ds,auction,netbook,dslite,qashqliq" />

<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">

<script language="JavaScript" src="ajax_global.js"></script>
<script type="text/javascript" src="SpryEffects.js"></script>
<script language="JavaScript">

function get_auction()
{

var x = Get_Auction ( "auction_data" );

var x2=x.split("|"); 

<?php

 /* get ending soon auctions */
$query = "select ends,id,title,current_high_bidder,current_bid,pict_url from PHPAUCTIONXL_auctions
         WHERE closed='0' AND
         suspended='0' AND ";
         $query .= "starts<=".$NOW."
         order by ends LIMIT ".$SETTINGS['endingsoonnumber'];
$result = mysql_query($query);
$num_auction = mysql_num_rows($result);

$i=0;
$ii=0;
$active_area = "";
while($i < $num_auction) {
           
$i++;
$ii++;
$active_area .= "//ACTIVE AUCTION DATA #$i \r";
$active_area .= "//vvvvvvvvvvvvvvvv \r";

$active_area .= "ends$i = x2[$ii];";
$ii++;
$active_area .= "title$i = x2[$ii];";
$ii++;
$active_area .= "id$i = x2[$ii];";
$ii++;
$active_area .= "high_bidder$i = x2[$ii];";
$ii++;
$active_area .= "high_bid$i = x2[$ii];";
$ii++;
$active_area .= "picture_url$i = x2[$ii];\r";
 $ii++;
    $active_area .= "retail$i = x2[$ii];\r";
//$active_area .= "CountdownTimer$i();\r";
            
}


$query = "select retail,starts,id,title,current_high_bidder,current_bid,pict_url from PHPAUCTIONXL_auctions
         WHERE closed='0' AND
         suspended='0' AND ";
$query .= "starts>=".$NOW."
         ORDER BY starts DESC
         LIMIT ".$SETTINGS['lastitemsnumber'];
 $result = mysql_query($query);
$num_auction1 = mysql_num_rows($result);

$iii=0;
$i=0;
$holding_area = "";
while($iii < $num_auction1) {
           
$i++;
$ii++;
$holding_area .= "//HOLDING AUCTION DATA #$i \r";
$holding_area .= "//vvvvvvvvvvvvvvvv \r";

$holding_area .= "starts$i$i = x2[$ii];";
$ii++;
$holding_area .= "title$i$i = x2[$ii];";
$ii++;
$holding_area .= "id$i$i = x2[$ii];";
$ii++;
$holding_area .= "picture_url$i$i = x2[$ii];\r"; 
                                                 
 $ii++;
 $holding_area .= "retail$i$i = x2[$ii];\r";
//$holding_area .= "CountdownTimer$i();\r";
$iii++;
               
}


echo $active_area; 
echo $holding_area; 



?>
           

setTimeout("get_auction()", 5000);

}













                         <?php


$i=0;
$ii=0;
$sa = "";
while($i < $num_auction) {
           
$i++;
$ii++;


$sa .= "high_bid$i$i = 'x';";



}


echo $sa; 

?>













 
 
 
<?php

$i=0;
$ii=0;
$counter = "";
while($i < $num_auction) {

$ii++;

$counter .= "function CountdownTimer$ii() {";

$counter .= " var dthen = new Date(ends$ii);"; 
$counter .= " var dnow = new Date(); ";
$counter .= " ddiff = new Date(dthen-dnow);"; 
$counter .= " gsecs = Math.floor(ddiff.valueOf()/1000); ";


        $counter .= "if(high_bid$ii$ii == 'x') {";


$counter .= "high_bid$ii$ii = high_bid$ii;";

 $counter .= "}";


$counter .= "if(high_bid$ii$ii < high_bid$ii) {";


   
   //$counter .= "  document.getElementById('bid$ii').innerHTML = \"\"+ high_bid$ii +\"\";"; 
     
     
     
     
$counter .= "      (new Spry.Effect.Highlight(document.getElementById('highbid$ii'), {from:'#EF0000', to:'#FFFFFF', restoreColor: '#FFFFFF'})).start();      ";
  
                    $counter .= "high_bid$ii$ii = high_bid$ii;";


$counter .= "}";
                       
       //                $counter .= "  document.getElementById('bid$ii$ii').innerHTML = \"\"+ high_bid$ii$ii +\"\";"; ; 
 $counter .= "  document.getElementById('retail$ii').innerHTML = \"$\"+ retail$ii +\"\";";    
     
$counter .= "  document.getElementById('highbid$ii').innerHTML = \"$\"+ high_bid$ii +\"\";";   

$counter .= "  document.getElementById('highbidder$ii').innerHTML = \"\"+ high_bidder$ii +\"\";\r";

$counter .= "document.getElementById('href$ii').innerHTML=\"\" + title$ii +\"\";\r";

$counter .= "document.getElementById('href$ii').href=\"item.php?id=\" + id$ii + \"\";";

$counter .= "document.getElementById('href$ii$ii').href=\"item.php?id=\" + id$ii + \"\";";

$counter .= "document.getElementById('href$ii$ii$ii').href=\"item.php?id=\" + id$ii + \"\";";

$counter .= "document['item_pic$ii'].src =\"uploaded/\" + picture_url$ii + \"\";";

$counter .= "if(gsecs < -1) {";

$counter .= "document['bidbutton$ii'].src =\"images/bidbutton3.jpg\";";

$counter .= "}";

$counter .= "  setTimeout(\"CountdownTimer$ii()\", 1000); ";

$counter .= "if(high_bid$ii != undefined) {";

$counter .= "   TimeFormatter(gsecs, \"countdown$ii\"); ";

$counter .= "}";

$counter .= "if(high_bid$ii == undefined) {";

$counter .= "  document.getElementById('retail$ii').innerHTML = \" \";";

$counter .= "  document.getElementById('highbid$ii').innerHTML = \" \";";   

$counter .= "  document.getElementById('highbidder$ii').innerHTML = \" \";\r";

$counter .= "document.getElementById('href$ii').innerHTML=\" \";\r";

$counter .= "document.getElementById('countdown$ii').innerHTML = \" \"; ";

$counter .= "document['bidbutton$ii'].src =\"images/blank.gif\";";

$counter .= "document['item_pic$ii'].src =\"images/blank.gif\";";

$counter .= "}";

$counter .= " }\r";



$i++;



}

echo $counter;

 ?>
 
 
 
 
 <?php
$i=0;
$ii=0;

$holding_counter = "";


while($i < $num_auction1) {

$ii++;

$holding_counter .= "function HoldingCountdownTimer$ii() {";


//$holding_counter .= "alert(starts$ii$ii);";
$holding_counter .= " var dthen1 = new Date(starts$ii$ii);"; 
//$holding_counter .= "alert(dthen1);";
$holding_counter .= " var dnow1 = new Date(); ";
//$holding_counter .= "alert(dnow1);";
$holding_counter .= " dddifff = new Date(dthen1-dnow1);"; 
$holding_counter .= " gsecs2 = Math.floor(dddifff.valueOf()/1000); ";
 //   $holding_counter .= "alert(gsecs2);";
 //$holding_counter .= "alert(dddifff);";

$holding_counter .= "  document.getElementById('holding_retail$ii').innerHTML = \"$\"+ retail$ii$ii +\"\";";    

$holding_counter .= "document.getElementById('holding_href$ii$ii').innerHTML=\"\" + title$ii$ii +\"\";\r";

$holding_counter .= "document.getElementById('holding_href$ii').href=\"item.php?id=\" + id$ii$ii + \"\";";

$holding_counter .= "document.getElementById('holding_href$ii$ii').href=\"item.php?id=\" + id$ii$ii + \"\";";


//$holding_counter .= "document.getElementById('holding_href$ii').innerHTML=\"<img src=uploaded/\" + picture_url$ii$ii +\" border=0>\";\r";

$holding_counter .= "document['holding_item_pic$ii'].src =\"uploaded/\" + picture_url$ii$ii + \"\";";
      //$holding_counter .= "alert(picture_url$ii$ii);";

$holding_counter .= "  setTimeout(\"HoldingCountdownTimer$ii()\", 1000); ";

$holding_counter .= "if(title$ii$ii != undefined) {";

 $holding_counter .= "   HoldingTimeFormatter(gsecs2, \"holding_countdown$ii\"); ";

$holding_counter .= "}";



$holding_counter .= "if(title$ii$ii == undefined) {";

$holding_counter .= "  document.getElementById('holding_retail$ii').innerHTML = \" \";";

$holding_counter .= "  document.getElementById('holding_title$ii').innerHTML = \" \";";                 

$holding_counter .= "document.getElementById('holding_href$ii').innerHTML=\" \";\r";

$holding_counter .= "document.getElementById('holding_href$ii$ii').innerHTML=\" \";\r";

$holding_counter .= "document.getElementById('holding_href$ii').href=\" \";\r";

$holding_counter .= "document.getElementById('holding_href$ii$ii').href=\" \";\r";

$holding_counter .= "document.getElementById('holding_countdown$ii').innerHTML= \" \"; ";

$holding_counter .= "document['holding_item_pic$ii'].src =\"images/blank.gif\";";

$holding_counter .= "}";

$holding_counter .= " }\r";




$i++;



}

echo $holding_counter;

 ?>
 
 
 
 
 

get_auction();

</script>

      


	    
  </head>
  <body onload=
  
  <?php


$i=0;
$ii=0;
$onload = "";
while($i < $num_auction) {
           
$i++;
$ii++;

$onload .= "CountdownTimer$i();";

}

$i=0;
$ii=0;
while($i < $num_auction1) {
           
$i++;
$ii++;

$onload .= "HoldingCountdownTimer$i();";

}

$onload .= "  bgcolor=#ffffff>";

echo $onload; 

?>
  
  


    
    

<?php

include ("header_nav2.html");








/* get ending soon auctions */
$query = "select ends,id,title,current_high_bidder,current_bid,pict_url from PHPAUCTIONXL_auctions
         WHERE closed='0' AND
         suspended='0' AND ";
         $query .= "starts<=".$NOW."
         order by ends LIMIT ".$SETTINGS['endingsoonnumber'];
$result = mysql_query($query);
$num_auction = mysql_num_rows($result);


$i = 0;
$ii = 0;
$aja = "";

while($ii < $num_auction) {
         
   $title 	= mysql_result($result,$i,"title");
	$id 	= mysql_result($result,$i,"id");
	$ends 	= mysql_result($result,$i,"ends");
  $high_bidder 	= mysql_result($result,$i,"current_high_bidder");
	$high_bid 	= mysql_result($result,$i,"current_bid");
	$picture_url = mysql_result($result,$i,"pict_url");      
         
         
         
$i++;

$aja .= "<div class=\"ACTIVEBOX\" id=\"box$i\">\r";

$aja .= "<div class=\"TITLE\">\r";

$aja .= "  <a href=\"item.php?id=$id\" id=\"href$i\">\r";

$aja .= " $title$i   </a></div>\r";

$aja .= "<div class=\"RETAILPRICE\" id=\"retail$i\">\r";

$aja .= "--------\r";

//$aja .= "<p id=\"retail$i\">  </p>\r";

$aja .= "</div>\r";

$aja .= "<div class=\"ITEMPIC\">\r"; 
  
//$aja .= "<p id=\"item_pic$i$i\" >\r";
 
$aja .= "  <a href=item.php?id=$id id=\"href$i$i\">\r";

$aja .= "  <img src='uploaded/$picture_url' 	alt='Auction Item' border='0' name=\"item_pic$i\">\r"; 
 
//$aja .= "    </a></p></div>\r";

$aja .= "    </a></div>\r";

$aja .= "<div class=\"COUNTDOWN\" id=\"countdown$i\"> 00:00:00\r";

///$aja .= "<p id=\"countdown$i\"> 00:00:00 </p>\r";

$aja .= "</div>\r";

$aja .= "<div class=\"HIGHBID\" id=\"highbid$i\">\r";

//$aja .= "<p id=\"highbid$i\">\r";

//$aja .= "$high_bid  </p>\r";

  $aja .= "$high_bid  \r";

$aja .= "</div>\r";

$aja .= "<div class=\"HIGHBIDDER\" id=\"highbidder$i\">\r";

//$aja .= "<p id=\"highbidder$i\"> $high_bidder </p>\r";

$aja .= "$high_bidder </div>\r";

$aja .= "<div class=\"BIDBUTTON\" id=\"BIDBUTTON\">\r";

$aja .= "  <a href=item.php?id=$id id=\"href$i$i$i\" onmouseover=\"button('bidbutton$i','images/bidbutton2.jpg')\" 
onmouseout=\"button('bidbutton$i','images/bidbutton1.jpg')\"> \r";

$aja .= "<img  src=\"images/bidbutton1.jpg\" name=\"bidbutton$i\" border=0 alt='Bid Button'>\r";

$aja .= "    </a>\r";

$aja .= "</div>\r";

$aja .= "<div class=\"PROMO\">\r";
    
$aja .= "</div>\r";

$aja .= "<div class=\"TYPE\">\r";

$aja .= "</div>\r";

$aja .= "</div> \r";

$ii++;
  
         }
  
      echo $aja;
  
  ?> 
  
  
  
  
  
  
  
  
  
  
 <?php






$query = "select retail,starts,id,title,current_high_bidder,current_bid,pict_url from PHPAUCTIONXL_auctions
         WHERE closed='0' AND
         suspended='0' AND ";
$query .= "starts>=".$NOW."
         ORDER BY starts DESC
         LIMIT ".$SETTINGS['lastitemsnumber'];
 $result = mysql_query($query);
$num_auction1 = mysql_num_rows($result);


$ii = 0;
$i = 0;
$holding_area = "";

while($ii < $num_auction1) {
         
   $title 	= mysql_result($result,$ii,"title");
	$id 	= mysql_result($result,$ii,"id");
	$starts 	= mysql_result($result,$ii,"starts");
$picture_url = mysql_result($result,$ii,"pict_url");      
         
  
$i++;

$holding_area .= "<div class=\"HOLDINGBOX\" id=\"holding_box$i\">\r";

$holding_area .= "<div class=\"HOLDINGITEMPIC\">\r"; 
  
//$holding_area .= "<p id=\"item_pic$i$i\" >\r";
 
$holding_area .= "  <a href=item.php?id=$id id=\"holding_href$i\">\r";

$holding_area .= "  <img src='uploaded/$picture_url' 	alt='Auction Item' Border='' name=\"holding_item_pic$i\">\r"; 
 
//$holding_area .= "    </a></p></div>\r";

$holding_area .= "    </a></div>\r";


$holding_area .= "<div class=\"HOLDINGTITLE\" id=\"holding_title$i\">\r";

$holding_area .= "  <a href=\"item.php?id=$id\" id=\"holding_href$i$i\">\r";

$holding_area .= " $title   </a></div>\r";


$holding_area .= "<div class=\"HOLDINGRETAILPRICE\" id=\"holding_retail$i\">\r";

$holding_area .= "--------\r";

//$holding_area .= "<p id=\"retail$i\">  </p>\r";

$holding_area .= "</div>\r";


$holding_area .= "<div class=\"HOLDINGCOUNTDOWN\" id=\"holding_countdown$i\"> 00:00:00\r";

///$holding_area .= "<p id=\"countdown$i\"> 00:00:00 </p>\r";

$holding_area .= "</div>\r";

$holding_area .= "</div>\r";

$ii++;
  
         }
  
      echo $holding_area;
  
  ?>  
  
  
  
  
  
  
  
  
  
  
  
     </DIV>
  </body>
  </html>